{extend name="layout/app" /}

{block name="title"}首页{/block}

{block name="main"}
<main role="main" class="d-flex flex-grow-1">
    <div class="d-flex main-wrap justify-content-between min-vh-100">
        <div class="primary-col">
            <!-- 顶部导航条 -->
            <div class="breadcrumb d-flex justify-content-between align-items-center px-3 js-scroll">
                <a href="/login" class="btn btn-sm btn-icon only-on-sm" role="button">
                    <i class="iconfont icon-user"></i>
                </a>
                <h2 class="fs-18px fw-bold cursor-pointer js-top">主页</h2>
                <a class="btn btn-sm btn-icon" href="/blog/create"><i class="iconfont icon-edit"></i></a>
            </div>

            <!-- 发帖框 -->
            {include file='layout/_composer' /}
            <!-- 帖子列表 -->
            {include file='layout/_list_twitter' /}
            <!-- 分页 -->
            {:render_pagination($posts[1])}

        </div>
        <div class="sidebar-col">
            <div class="position-sticky sidebar-sticky">
                <div class="position-relative mt-2 mb-3">
                    <i class="iconfont icon-search search-iconfont"></i>
                    <input class="form-control rounded-5 search-input" type="text" placeholder="搜索">
                </div>
                <div class="tile mb-3">
                    <h2 class="mb-0 py-12px px-3 fs-6 fw-bold">每日帖不过３😉</h2>
                    <div class="px-3 pb-3">
                        <p class="mt-1 mb-3 fs-15px">友情提示，发帖和回帖都需要<i class="squiggle">扣除１枚金币</i>。</p>
                        <a class="btn btn-dark rounded-pill" href="/reward">领取今日登录奖励</a>
                    </div>
                </div>
                <!-- <div class="tile">
                    <h2 class="mb-0 py-12px px-3 fs-6 fw-bold">有什么新鲜事？</h2>
                    <div href="###" class="tile-item d-flex">
                        <img src="/static/img/avatar.jpg" width="60" height="60" alt="">
                        <div class="d-flex flex-column">
                            <div class="fw-bold">摔跤大赛是真打吗？</div>
                            <div class="fs-13px text-muted">摔角 . 昨天</div>
                        </div>
                    </div>
                    <div class="tile-item d-flex flex-column">
                        <div class="fs-13px text-muted">科幻</div>
                        <div>测试标题，测试标题，test</div>
                        <div class="fs-13px text-muted"><i class="iconfont icon-analytics"></i> 114</div>
                    </div>
                    <a class="d-flex p-3 tile-footer" href="###">更多</a>
                </div> -->
                <div class="tile mb-3">
                    <h2 class="mb-0 py-12px px-3 fs-6">主机赞助商</h2>
                    <div class="px-3 py-12px">
                        <a href="https://www.vpsor.cn?userCode=wh1fea2" data-bs-toggle="tooltip" data-bs-title="硅云" target="_blank" rel="nofollow noopener"><img src="https://cdn.vpsor.cn/nuxt/img/logo.png" height="60" alt=""></a>
                    </div>
                </div>
                <div class="tile">
                    <h2 class="mb-0 py-12px px-3 fs-6">友情链接</h2>
                    <div class="px-3 py-12px">
                        <ul class="list-inline">
                            <li class="list-inline-item"><a href="//www.jb51.net/" target="_blank">脚本之家下载</a></li>
                            <li class="list-inline-item"><a href="//www.a5xiazai.com/" target="_blank">A5下载网</a></li>
                        </ul>
                    </div>
                </div>
            </div>
        </div>
    </div>
</main>
{/block}

{block name="js"}
<script>
    document.addEventListener("DOMContentLoaded", () => {
        // 当前链接添加 active
        highlightActiveLink("home");
        // 切换当前链接的 iconfont
        updateIconClassOnActive('.app-link', 'icon-home', 'icon-home-fill');
    });
</script>
{/block}